Index  Decision Records ADR-185: Current Status Distribution Chart on the Decision Records Overview

ADR-185: Current Status Distribution Chart on the Decision Records Overview

1 Status

Date Status
01-06-2026 Proposed
01-06-2026 Accepted
01-06-2026 In-Progress
04-06-2026 Implemented

2 Context

The Decision Records Overview page reserves three chart cells inside decisions_overview_charts. The first holds the "Decision Records by Type" pie chart (ADR-177); the second holds the "Decision Records by Status Over Time" velocity chart (ADR-182). The third cell is still an empty placeholder.

The velocity chart answers "how has the workflow moved over the last six weeks" by computing each record's date-derived status as of six Fridays. What it does not answer at a glance is the simplest backlog question: "how many records are in each state right now?" A reader wanting the current shape of the backlog — how much is still Proposed, how much is stuck In-Progress, how much is Implemented — has to read the rightmost velocity bar (which is date-computed, not the authoritative marker) or scan the Status column of the table row by row.

The authoritative "current status" already exists per record: it is the status of the *-marked Status-table row, exposed as Decision#current_status and already rendered in the overview's Status column (ADR-172). This ADR surfaces the distribution of that value as the third chart.

The hard part is scale skew. In a mature project the terminal state dominates: there may be hundreds of Implemented records against two In-Progress and one Proposed. Two tempting fixes were considered and rejected (see Alternatives):

The chosen approach keeps the chart honest (linear, every record counted) and solves legibility by annotating counts in the labels rather than distorting the axis.

3 Decision

Add a third chart to the Decision Records Overview page — a Chart.js horizontal bar chart titled "Decision Records by Current Status" — placed in the third chart_cell of the existing decisions_overview_charts grid. This fills the last reserved cell.

3.1 Data source and aggregation

The chart aggregates Decision#current_status — the status of the row marked with * in each record's Status table (ADR-172) — not the date-derived effective_status_on used by the velocity chart. "Currently" means what the author has declared current via the marker.

For each record, the gem increments a count keyed by its current-status text. Status text is compared by exact, case-sensitive equality after stripping surrounding whitespace, identical to the velocity chart's rule (so Proposed and proposed are distinct, Implemented and Implemented are the same). This deliberately reuses the heterogeneous-vocabulary handling already established for ADR/ISSUE/ENH workflows — no canonical status list is imposed.

3.2 The "Undefined" category

Decision#current_status is nil when a record's Status table has zero * markers or more than one (per ADR-172). Rather than silently dropping such records, the chart counts them under a single explicit "Undefined" category.

This is intentional: "Undefined" is a data-quality indicator. A non-empty Undefined bar tells the reader that one or more decision records have a missing or ambiguous current-status marker and need to be corrected. The bar is rendered in a distinct neutral grey (the grey entry of CHART_PALETTE) so it reads as an anomaly to fix rather than as a normal workflow state.

3.3 Legibility under scale skew

The value axis is linear — bar length is honestly proportional to count. To keep small categories readable next to a dominant one, each category's count is embedded in its axis (tick) label, e.g. Implemented (1000), In-Progress (2), Proposed (1). The number is therefore always visible regardless of bar length, with no dependency on a data-labels plugin (core Chart.js only, consistent with the existing charts).

Horizontal orientation (indexAxis: 'y') is chosen so that long status names and a growing number of distinct statuses render as stacked rows without axis-label rotation.

3.4 Category ordering

Categories are ordered by first appearance in decision-record parse order (the same deterministic, vocabulary-agnostic ordering the velocity chart uses for its stack segments). The "Undefined" category, when present, is placed last, after all real statuses.

3.5 Rendering

The chart is rendered inline using Chart.js (already loaded for the existing charts). Configuration:

4 Scope

Item Status Start Date Target Date Description
Requirements Done 01-06-2026 02-06-2026 New SRS items (SRS-083 onward) covering: a horizontal bar chart of decision-record counts by current status in the third chart cell; aggregation by the *-marked current status with exact case-sensitive text match; the "Undefined" category for records with a missing or ambiguous current-status marker; a linear scale with the count shown in each bar label; first-seen category ordering with "Undefined" last
Code Done 01-06-2026 02-06-2026 Add a private helper on DecisionsOverview that tallies current_status across decisions (counting nil under "Undefined"), derives categories in first-seen order with "Undefined" appended last, and emits a horizontal-bar Chart.js config into the third chart_cell; embed each count in its label; reuse palette_rgba for colours and give "Undefined" the neutral grey entry; keep the legend hidden
Tests Done 01-06-2026 02-06-2026 End-to-end tests under spec/e2e/decisions_spec.rb: the chart canvas is emitted in the third chart cell; the chart type is bar with indexAxis: 'y'; the value scale is linear (no logarithmic axis); labels carry the counts; records are tallied under their *-marked status; records with zero or multiple markers fall under "Undefined"; "Undefined" is ordered last; an all-defined project emits no "Undefined" category

5 Out of Scope

6 Consequences

6.1 Positive

6.2 Negative

6.3 Neutral

7 Alternatives Considered

8 Software Versions

Software Version Category Software Version ID
Latest Released Version 0.4.0
Issue Found in Version n/a
Target Release Version 0.4.1

9 Affected Documents

# Proposed Text Req-ID
1 The Decision Records Overview page shall include a horizontal bar chart visualising the number of Decision Records grouped by their current status, placed in the third chart cell of the Decision Records Overview charts grid. SRS-083
2 The current-status distribution chart shall count each Decision Record under its current status — the status value of the row marked with "*" in the record's Status table — with status text compared by exact case-sensitive equality after stripping surrounding whitespace. SRS-084
3 The current-status distribution chart shall group every Decision Record whose current status is undefined under a single "Undefined" category, so that records with a missing or ambiguous current-status marker are surfaced for correction. SRS-085
4 The current-status distribution chart shall use a linear value scale and shall display each category's record count within its bar label, so that categories with small counts remain legible alongside categories with large counts. SRS-086
5 The categories of the current-status distribution chart shall be ordered by their first appearance in Decision Record parse order, with the "Undefined" category, when present, placed last. SRS-087

10 References

11 Review Evidences